<template>
  <h2>model子组件</h2>
  count的值：{{ mycount }}
  <button @click="add">+1</button>
</template>

<script>
export default {
  name:'mymodel',
  props:['mycount'],
  emits:['update:mycount'],
  methods:{
    add() {
      this.$emit('update:mycount',this.mycount + 1)
    } 
  }
}
</script>

<style>

</style>